package com.naruto.thinkmgr.comm;


import org.apache.shiro.session.Session;
import org.apache.shiro.session.SessionListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

@Component
public class MySessionListener implements SessionListener {

    private Logger logger = LoggerFactory.getLogger(MySessionListener.class);

    @Override
    public void onStart(Session session) {
        logger.debug("登录:" + session.getId());
    }

    @Override
    public void onStop(Session session) {
        logger.debug("登出:" + session.getId());
    }

    @Override
    public void onExpiration(Session session) {
        logger.debug("过期:" + session.getId());
    }
}
